home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / networking / 3151 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  5.4 KB

  1. Path: cs.uwa.edu.au!jasonb
  2. From: jasonb@cs.uwa.edu.au (Jason S Birch)
  3. Newsgroups: comp.sys.amiga.networking
  4. Subject: Re: Announce: AWeb 1.0 released!
  5. Date: 29 Mar 96 05:14:54 GMT
  6. Organization: The University of Western Australia
  7. Message-ID: <jasonb.828076494@cs.uwa.edu.au>
  8. References: <4iva78$5pa@news.xs4all.nl> <4j1f6e$984@news.uni-c.dk> <jasonb.827822336@cs.uwa.edu.au> <4j8o6r$9vj@serpens.rhein.de> <jasonb.827896888@cs.uwa.edu.au> <4jaue8$jh4@serpens.rhein.de> <jasonb.827996764@cs.uwa.edu.au> <4je3qj$kk@serpens.rhein.de>
  9. NNTP-Posting-Host: decadence.cs.uwa.oz.au
  10. X-Newsreader: NN version 6.5.0 #3 (NOV)
  11.  
  12. mlelstv@serpens.rhein.de (Michael van Elst) writes:
  13.  
  14. >jasonb@cs.uwa.edu.au (Jason S Birch) writes:
  15. >>>Well, that happens when you have to do calculations.
  16.  
  17. >>Only if you do the calculations at the same priority as your event
  18. >>handling.
  19.  
  20. Note that when I said "event handling", I was referring to the actual
  21. application processing of events, not just making the button look
  22. depressed. I'm talking about the application's *response* to being
  23. notified the button was depressed.
  24.  
  25. >Yes. But this isn't done by AWeb or ClassAct. It is done by MUI, most
  26. >editors and effectively by the console in raw mode.
  27.  
  28. But this is my whole point -- because MUI *does* process GUI responses
  29. to input events on the main task, programmers offload anything that is
  30. computationally intensive onto another task at a lower priority so that
  31. buttons will depress immediately when clicked. See IBrowse, AmIRC, and
  32. AmFTP for examples of this. As a side effect, because MUI doesn't show
  33. a button being depressed unless it is also about to process it, those
  34. applications also give an immediate response to those events. This is
  35. in contrast to AWeb, which *does* show the button being depressed
  36. immediately, but the actual processing of the event can take a second
  37. or two, so it feels sluggish.
  38.  
  39. Obviously, because of the way MUI works, a program written in exactly
  40. the same way AWeb has been, but using MUI instead, would be even
  41. worse, because the buttons themselves wouldn't depress for a second or
  42. two. The point is (good) programmers don't program in MUI in the same
  43. way. They use a subtask or put the application to sleep.
  44.  
  45. >>If AWeb put the image decoding at a lower priority itself (which is a
  46. >>reasonable thing to do,
  47.  
  48. >That's something that you do not want. You want I/O, decoding and
  49. >rendering done concurrently and this means: at the same priority so
  50. >that they are timesliced.
  51.  
  52. This is not contradicting what I said. I'm happy for I/O, decoding and
  53. *rendering* to be done concurrently, just as long as they're done
  54. concurrently at a lower priority than the main application's event
  55. handling loop. (I have emphasised the "rendering" because this appears
  56. to be the part that is not offloaded onto a subtask in AWeb. If it was,
  57. the subtask would get a lower priority and the main event loop -- which
  58. would then be simply waiting for user input -- would quite naturally
  59. get a higher priority. The fact that it doesn't is what causes the
  60. delay when processing events.)
  61.  
  62. >Of course you can drop the priority of all these tasks to the same
  63. >level. But apparently this is not what happens with Executive.
  64.  
  65. Executive dynamically adjusts the priorities every second so that, over
  66. time, several CPU-intensive tasks (originally at the same priority)
  67. will indeed get equal amounts of CPU time. This satisfies your
  68. requirement for timeslicing, except the timeslices tend to be in
  69. quantums of one second rather than four VBLs. Non-CPU intensive tasks
  70. are automatically raised in priority, because they are not using as
  71. much CPU. Since application event loops (especially in current MUI
  72. apps) tend to be non-CPU intensive, they tend to be running at a raised
  73. priority under Executive, which is why it can make MUI apps feel so
  74. responsive (they may not be processing button depressions at priority
  75. 20, but they're still above everything CPU intensive in the system
  76. which, on the Amiga, gives the same effect).
  77.  
  78. All it would take would be for the main event-handling task of AWeb
  79. not to do any heavy processing (it currently appears to do page
  80. layouts). Executive would then ensure that its priority remains above
  81. the other tasks, keeping the whole application responsive.
  82. Alternatively, starting the priorities of the image rendering tasks at
  83. a lower level than the main task would have a similar effect.
  84.  
  85. >>downloading tasks are handled separately, but it appears the page
  86. >>layout is handled by the same task that handles user interface events.
  87.  
  88. >Either that or the tasks are synchronized with semaphores.
  89.  
  90. I suspect the page layout is handled by the user interface
  91. event-handling task because only one process shows up (AWeb) when a
  92. big page is being layed out, and it's taking up an awful lot of CPU.
  93.  
  94. >>processing incoming events, making the whole thing feel sluggish. The
  95. >>ironic end result is that the MUI program actually feels *more*
  96. >>responsive.
  97.  
  98. >I can't see that MUI feels responsive when I click on a gadget and
  99. >do not get any feedback.
  100.  
  101. You've experienced this with one of the three apps I mentioned above?
  102.  
  103. >Regards,
  104. >                                Michael van Elst
  105. >Internet: mlelstv@serpens.rhein.de
  106.  
  107. -- 
  108. Jason S Birch                        ,-_|\ email: jasonb@cs.uwa.edu.au
  109. Department of Computer Science      /     \ Tel (work): +61 9 380 1840
  110. The University of Western Australia *_.-._/ Fax (work): +61 9 380 1089
  111. Nedlands  W. Australia  6907             v  Tel (home): +61 9 386 8630
  112.